import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
// 引入element plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 图标 图标在附件中
import '@/assets/icon/iconfont.css'
import '@/assets/base.scss'
// 引入cookies
import VueCookies from 'vue-cookies'
const app = createApp(App)
import Request from './utils/Request.js'
import Message from './utils/Message.js'
import Utils from "@/utils/Utils";

import Table from "@/components/Table.vue";
import Icon from "@/components/Icon.vue";
import NoData from "@/components/NoData.vue";
import Dialog from "@/components/Dialog.vue";
import FolderSelect from "@/components/FolderSelect.vue";
import Navigation from "@/components/Navigation.vue";

app.component('Table', Table);
app.component('Icon', Icon);
app.component('NoData', NoData);
app.component('Dialog', Dialog);
app.component('FolderSelect', FolderSelect);
app.component('Navigation', Navigation);

app.use(ElementPlus)
app.use(router)

// 全局注册组件
app.config.globalProperties.Request = Request;
app.config.globalProperties.Message = Message;
app.config.globalProperties.Utils = Utils;
app.config.globalProperties.globalInfo = {
    avatarUrl: "/api/getAvatar/",
    imageUrl: "/api/file/getImage"
};

app.mount('#app')